#ifndef __EFFECT_BASE__
#define __EFFECT_BASE__

#include "Ogre.h"


using namespace Ogre;
class EffectBase
{
public:

	enum AS_State
	{
		ASS_INACTIVE,
		ASS_STARTED,	
	};



	EffectBase();
	~EffectBase();

	SceneManager * m_pSceneMgr;
	Camera * m_pCamera;

	bool mEnabled;
	AS_State mPlayingState;

	virtual void init(SceneManager * _pSceneMgr,Camera * _pCamera);
	virtual void load();
	virtual void update(Ogre::Real timeSinceLast);
	virtual void eventClick(int _xx, int _yy);
	virtual void eventMouseMove(int _x, int _y, int _xRel, int _yRel, bool isButtonDown);
	virtual void eventMouseRelease(int _xx, int _yy);
	virtual void stateMouseDown(int _x, int _y, int _xRel, int _yRel, bool isButtonDown);
	

	virtual void begin();
	virtual void stop();

	virtual void setEnabled(bool);//only work for enbale update

	/**Linear function
	@param y = ax + b, [startX, endX]
	*/
	static Real vanishFunction_Linear(Real x, Real a, Real b); 
	/**Parabola function
	@param y = ax^2 + bx + c, [startX, endX]
	*/
	static Real vanishFunction_Parabola(Real x, Real a, Real b, Real c);
	/**Triangular function(simplest)
	@param y = a * sin(x) + b * cos(x), [startX, endX]
	*/
	static Real vanishFunction_Triangular(Real x, Real a, Real b);


protected:
private:
};









#endif